<div class="span-8 content_title">Non-Replicated Programs<%= ": #{@non_replicated_programs.size}" unless @non_replicated_programs.nil? %></div>
<div class="span-8 content_title">Replicated Programs<%= ": #{@replicated_programs.size}" unless @replicated_programs.nil? %></div>

<div id="content_non_replicated" class="span-8 content_non_replicated content_min_height">
	<div id="non_replicated_programs">
		<% unless @non_replicated_programs.nil? or @non_replicated_programs.blank? %>
			<% @non_replicated_programs.each do |program| %>		
				<div id=<%= "program_#{program.id}" %> class="non_replicated_program"><%= "#{program.name}" %></div>
				<%= draggable_element "program_#{program.id}", :revert => true %>
			<% end %>
		<% else %>
			<%= "<p><b>Drag a Program to here, to stop replication into this Storage System:</b> #{@replication_system.name}</p>" %>
		<% end %>
	</div>
</div>

<div id="content_replicated" class="span-8 last content_replicated content_min_height">
	<div id="replicated_programs">
		<% unless @replicated_programs.nil? or @replicated_programs.blank? %>
			<% @replicated_programs.each do |program| %>		
				<div id=<%= "program_#{program.id}" %> class="replicated_program"><%= "#{program.name}" %></div>
				<%= draggable_element "program_#{program.id}", :revert => true %>
			<% end %>
		<% else %>
			<%= "<p><b>Drag a Program to here, to replicate its contents in this Storage System:</b> #{@replication_system.name}</p>" %>
		<% end %>
	</div>
</div>

<%= drop_receiving_element 'content_non_replicated',
		:update => 'replication_area', :url => { :controller => 'fetchers', :action => 'remove_replicated_program', :repository_id => @replication_system.id },
		:accept => 'replicated_program', :hoverclass => 'active_content',
		:loading => "Element.show('replication_info')", :complete => "Element.hide('replication_info')" %>
		
<%= drop_receiving_element 'content_replicated',
		:update => 'replication_area', :url => { :controller => 'fetchers', :action => 'add_replicated_program', :repository_id => @replication_system.id },
		:accept => 'non_replicated_program', :hoverclass => 'active_content',
		:loading => "Element.show('replication_info')", :complete => "Element.hide('replication_info')" %>